<?php
/**
 * @package WordPress
 * @subpackage LRC-Library_Theme
 */
?>
<?php get_header(); ?>	
<?php if (have_posts()) :?>
 	  <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

		<h1 class="catheader">Books in " <?php single_cat_title(); ?> " Category/Class</h1>
<br /><br />
<table border="5" cellpadding="5" cellspacing="15" width="99%" cols="6" id="booklist" class="booklist">
<tr border="1" id="booklist" class="booklist"><td><h3>Book ID:</h3></td><td><h3>Title:</h3></td><td><h3>Authors</h3></td><td><h3>Category/Class</h3></td><td><h3>Publishers</h3></td><td><h3>listed Date</h3></td></tr>
<?php while (have_posts()) : the_post(); ?>

<?php
		$custom = get_post_custom($post->ID);
		$thumb = $custom['book-thumb'][0];
		$bookid= $custom['bookid'][0];
		$authors= $custom['bookauthors'][0]; ?>

<tr><td><a href="<?php the_permalink() ?>" title="<?php printf(__("Permanent Link to %s", "wpbl"), the_title_attribute('echo=0')); ?>"><?php echo $bookid; ?></a></td>
<td style="width:200px;"><a href="<?php the_permalink() ?>" title="<?php printf(__("Permanent Link to %s", "wpbl"), the_title_attribute('echo=0')); ?>"><?php the_title(); ?></a></td>

<td>
<?php the_terms( $post->ID, 'authors'); ?></td>
<td><?php the_terms( $post->ID, 'classcat'); ?></td>
<td><?php the_terms( $post->ID, 'publishers'); ?></td>
<td><?php the_terms( $post->ID, 'dates'); ?></td>
</tr>


<?php endwhile; ?></table><br />	<?php
    if(function_exists('pagination')) { pagination(); }
    ?>
	<br />
	<?php else: ?>

<div class="entry">
<p><?php _e('Sorry, no posts matched your criteria.','wpbl'); ?></p>
</div>

<?php endif; ?>

<?php get_footer(); ?>